-- GENERATED SPELL FOR [Jaloot] --


function spell0_28667(pUnit, Event) --@Energy Siphon,n/a--
pUnit:FullCastSpellOnTarget(52969,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28667', 1000, 1)
end

function spell1_28667(pUnit, Event) --@Lightning Strike,n/a--
pUnit:FullCastSpellOnTarget(52944,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28667', 3000, 1)
end

function spell2_28667(pUnit, Event) --@Lightning Whirl,n/a--
pUnit:FullCastSpellOnTarget(52943,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28667', 654, 1)
end

function spell3_28667(pUnit, Event) --@Spark Frenzy,Self--
pUnit:FullCastSpellOnTarget(52964,pUnit)
pUnit:RegisterEvent('Sorts_28667', 8000, 1)
end

function spell4_28667(pUnit, Event) --@Tomb of the Heartless,Self--
pUnit:FullCastSpellOnTarget(52182,pUnit)
pUnit:RegisterEvent('Sorts_28667', 653, 1)
end

function Sorts_28667(pUnit, Event)
local choix_sorts_28667 = math.random(0, 4)
if choix_sorts_28667 == 0 then
pUnit:RegisterEvent('spell0_28667', 1, 1)
end
if choix_sorts_28667 == 1 then
pUnit:RegisterEvent('spell1_28667', 1, 1)
end
if choix_sorts_28667 == 2 then
pUnit:RegisterEvent('spell2_28667', 1, 1)
end
if choix_sorts_28667 == 3 then
pUnit:RegisterEvent('spell3_28667', 1, 1)
end
if choix_sorts_28667 == 4 then
pUnit:RegisterEvent('spell4_28667', 1, 1)
end
end

function mob28667_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_28667', math.random(1500, 3000), 1)
end

function mob28667_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob28667_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob28667_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(28667, 1, 'mob28667_Action')
RegisterUnitEvent(28667, 2, 'mob28667_Leave')
RegisterUnitEvent(28667, 3, 'mob28667_Kill')
RegisterUnitEvent(28667, 4, 'mob28667_Die')
